import re
import requests

link = 'http://www.heibanke.com/lesson/crawler_ex00/'
new_link = link
count = 1

while True:
    html = requests.get(new_link).text
    number = re.search(r'(?<=<h3>).*?(\d+).*?(?=</h3>)', html)

    if number:
        new_link = link + number.group(1)
    else:
        print(re.search(r'<h3>(.*?)</h3>', html).group(1))
        break

    print(f"{count}: {number.group()}")
    count += 1
